import { queryAuth } from '@/services/auth';


export default {

    namespace: 'auth',
    
    state: {
        authGroupList: [],
    },
    
    effects: {
        *fetchSelAuthAll(param, { call, put }) {
            const response = yield call(queryAuth, param);
            console.log(response.success)
            if(response.success){
                yield put({
                    type: 'selAuthAll',
                    payload: response.data,
                });
            }
        },
    },
    
    reducers: {
        selAuthAll(state, action) {
            console.log(action)
            return {
                ...state,
                authGroupList: action.payload,
            };
        },
    },

}